home *** CD-ROM | disk | FTP | other *** search
/ JCSM Shareware Collection 1996 September / JCSM Shareware Collection (JCS Distribution) (September 1996).ISO / bother__ / cenvid.zip / CENVIDOS.ZIP / REBOOT_2.BAT < prev    next >
DOS Batch File  |  1995-03-28  |  2KB  |  46 lines

  1. @echo off
  2. REM ****************************************************************
  3. REM *** Reboot_2.bat - Reboot computer by jumping to BIOS reboot ***
  4. REM *** ver.1          routine.  This is an example of the CEnviD ***
  5. REM ***                asm() function.  To provide protection    ***
  6. REM ***                from accidentaly rebooting, you must      ***
  7. REM ***                enter PLEASE as the first parameter.      ***
  8. REM ****************************************************************
  9.  
  10.  
  11. REM **************************************************************
  12. REM *** Check that "PLEASE" is the first parameter.  CEnviD     ***
  13. REM *** return errorlevel if it is not please.                 ***
  14. REM **************************************************************
  15. CEnviD return( strcmpi("%1","Please") ? 1 : 0 )
  16. if errorlevel 1 GOTO PLEASE
  17.  
  18. REM ************************************************
  19. REM *** Set warm boot flag to avoid memory tests ***
  20. REM ************************************************
  21. CEnviD poke(0x472,0x1234,UWORD16);
  22.  
  23. REM ********************************************************
  24. REM *** Call Dos disk reset to make smartdrive 4.x flush ***
  25. REM ********************************************************
  26. CEnviD reg.ah = 0x0D; interrupt(0x21,reg);
  27.  
  28. REM **********************************************************
  29. REM *** Set ctrl-alt-del scan code for EMM386 to shut down ***
  30. REM **********************************************************
  31. CEnviD "poke(0x417,peek(0x417)|0x0C); reg.ax=0x4F53; interrupt(0x15,reg);"
  32.  
  33. REM **************************************************************
  34. REM *** A routine for rebooting is in the BIOS at location     ***
  35. REM *** FFFF:0000.  To reboot, will use the CEnviD asm()        ***
  36. REM *** to execute the machine code: JMPF FFFF:0000, which in  ***
  37. REM *** machine code is the byte sequence EA 00 00 FF FF.      ***
  38. REM **************************************************************
  39. CEnviD asm('\xEA\x00\x00\xFF\xFF');
  40.  
  41. :CENVI_EXIT
  42.  
  43. :PLEASE
  44. ECHO Reboot_2.bat will reboot your computer.  To execute Reboot.bat you
  45. ECHO must enter: REBOOT_2 PLEASE
  46.